It is sometimes desired to compare two images that are supposed to be practically identical (e.g. identical to the human eye) to determine whether indeed they are so. This may be desired, for example, when considering two prints of the same image, a printed image (compared to its digital image file), two different representations of the same image, and various other pairs of supposedly identical images.
The causes for differences in supposedly identical images are various and may include, for example, encountering printing defects, using of different compression methods and improper alignment (misregistration).
Defects in printed images can be caused, for example, by anomalies in print medium, interactions between print medium and marking material, systematic defects introduced by print mechanisms or human error. Image defects may include, for example, scratches, spots, missing dot clusters, streaks, and banding.
One specific defect is misregistration, which occurs when the two copies of the same image are shifted with respect to one another by as much as one or more pixels, yet the same image appears in both copies. While misregistration by a plurality of pixels may be spotted by the human eye, misregistration by a single or a few pixels is very hard to detect and sub-pixel registration (a shift of a duplicate image by less than a pixel with respect to the reference image) is practically impossible to spot by human inspection. Furthermore, in many instances it would not desired to tag a pair of slightly shifted images as “different”.
A few years ago a new image quality assessment approach was introduced, named SSIM (Structural SIMilarity) index or measure, in which a quantitative approach was used to quantify visibility of errors (differences) between a distorted image and a reference image, based on the degradation of structural information.
SSIM successfully recognizes matching structural features in misregistered images, preventing tagging of these images as different, when misregistration consists of one or more pixels.
However, in some instances sub-pixel misregistration may be involved. This is caused when two identical images differ in their alignment by a fraction of a pixel. As a single pixel may only take one grey level value. Consider, for example, a case in which an original image presents an edge formed of adjacent bordering pixels, e.g. a row of adjacent pixels whose values are: 0,0,1,1. If a duplicate image is shifted with respect to the original image by less than one pixel (e.g. by half a pixel to the left) than the pixel values of the corresponding pixel row of the duplicate image would be: 0.0.5,1,1—the pixel with the value of 0.5 being an average value of 0 and 1.
Applying SSIM would result in determining that there is a difference between the original and duplicate images, where in fact, the two images would not be regarded as be different when inspected by a human eye.